import request from '@/utils/request';

export function login(data: { username: string; password: string }) {
  return request({
    url: '/api/auth/login',
    method: 'post',
    data
  });
}

export function register(data: { username: string; password: string; email: string; nickname: string }) {
  return request({
    url: '/api/auth/register',
    method: 'post',
    data
  });
}

export function logout() {
  return request({
    url: '/api/auth/logout',
    method: 'post'
  });
} 